<?php


namespace App\Tools;


class JsonTools
{
        public static function JsonSuccess($data=[],$code=200,$msg="成功"){
            return [
              'data'=>$data,
              'code'=>$code,
              'msg'=>$msg
            ];
        }

        public static function JsonError($data=[],$code=2001,$msg="失败"){
            return [
                'data'=>$data,
                'code'=>$code,
                'msg'=>$msg
            ];
        }
}
